package com.bsb.biz.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bsb.base.mapper.BsbRotationMapper;
import com.bsb.base.model.BsbRotation;
import com.bsb.base.model.BsbRotationExample;

@Service
public class BsbRotationService{
	
	@Resource
	private BsbRotationMapper bsbRotationMapper;
	
	public void addBsbRotation(BsbRotation bsbRotation) {
		bsbRotationMapper.insertSelective(bsbRotation);
	}
	
	public void delBsbRotationByUuid(String uuid) {
		bsbRotationMapper.deleteByPrimaryKey(uuid);
	}
	
	public void updateBsbRotation(BsbRotation bsbRotation) {
		bsbRotationMapper.updateByPrimaryKeySelective(bsbRotation);
	}
	
	public void updateBsbRotationByExample(BsbRotation bsbRotation,BsbRotationExample bsbRotationExample){
	    bsbRotationMapper.updateByExampleSelective(bsbRotation,bsbRotationExample);
	}
	
	public BsbRotation getBsbRotationByUuid(String uuid) {
		return bsbRotationMapper.selectByPrimaryKey(uuid);
	}
	
	public List<BsbRotation> getPageBsbRotation(BsbRotationExample bsbRotationExample) {
		return bsbRotationMapper.selectPage(bsbRotationExample);
	}
	
	public int countBsbRotation(BsbRotationExample bsbRotationExample) {
		return bsbRotationMapper.countByExample(bsbRotationExample);
	}
	
	public List<BsbRotation> selectByExample(BsbRotationExample example){
	    return bsbRotationMapper.selectByExample(example);
	}
}
